The present invention relates to an electronic control unit which communicates with external devices, and more particularly to an in-vehicle electronic control unit which executes data communication with a portable transmitter/receiver such as a hand-carried electronic key.
Microcomputers generally have communication functions (communication resources) such as a universal asynchronous receiver transmitter (UART) and a serial communication I/F. Since this type of communication is executed by using Non-Return-to-Zero (NRZ) coding system, it is difficult to synchronize signals. As a result, this type of communication is not suitable for a wireless communication which has a large data length and no clock lines.
It is proposed to realize a radio communication by using PWM (pulse-width-modulation)-type data communication system. Since the PWM-type communication system generates an edge for each bit, it is easy to synchronize signals. In this communication, a microcomputer uses a PWM data communication circuit (PWM communication resource) so that a data train is converted into an output pattern having a predetermined pulse width and transmitted to external devices. However, the PWM data communication circuit requires additional circuits and its circuit size becomes large and complicated. Further, the output pattern is necessarily limited. Costs will increase when the output pattern is made variable.